package com.mytools.tool.calendar;


import android.content.Context;
import android.graphics.Color;
import android.graphics.drawable.ColorDrawable;
import android.view.Gravity;
import android.widget.GridView;
import android.widget.LinearLayout;

import com.eboss2.sbs.R;

public class CalendarGridView extends GridView {

    private Context mContext;

    public CalendarGridView(Context context) {
        super(context);
        mContext = context;
        setGirdView();
    }

    private void setGirdView() {
        LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);
        setLayoutParams(params);
        setNumColumns(7);
        setGravity(Gravity.CENTER_VERTICAL);
        setVerticalSpacing(1);
        setHorizontalSpacing(1);
        setSelector(new ColorDrawable(Color.TRANSPARENT));
        setBackgroundColor(getResources().getColor(R.color.linec2));
        setPadding(1, 1, 1, 2);
    }
}